Element selection in a graphical user interface (GUI) environment on a computer system, such as a GUI of Microsoft Visio or another application program, is an essential action to facilitate creating and modifying a diagram, figure, or other type of document. Typically, a document displayed in a GUI includes one or more elements, such as shapes, letters, numbers, or symbols. These elements may need to be selected to perform editing functions in the GUI environment, such as moving, sizing, or changing the color of the elements, for example.
An element selection perimeter (which is also known as a “lasso”) provides the capability to select one or more elements in a document by enclosing the elements within a closed curve (i.e., a perimeter) that can be produced by various methods. One popular method of producing an element selection perimeter is the use of an element selection tool, which is also known as a “lasso tool.” An element selection tool can produce an element selection perimeter in response to a user's input actions made with a computer system input device, such as a mouse or digitizer pen. Typically, an element selection perimeter that is produced using an element selection tool is defined by points (also referred to as vertices) that are generated by the input device and correspond to the movement of the element selection tool in a GUI. These points are connected in sequence by line segments to produce an element selection perimeter. Thus, an element selection perimeter can offer a user the convenient capability of selecting multiple elements at the same time instead of having to select each element individually.
The process of element selection in a GUI with an element selection perimeter should occur quickly and efficiently to provide useful performance. However, existing approaches to the process of element selection in a GUI typically provide slow element selection performance. Furthermore, the existing approaches typically require a significant amount of processing by a computer system processor to execute the process, which can degrade the overall performance of the computer system, such as the capability to execute other processes.
The slow and processor-intensive performance of existing approaches to element selection processes can be attributed to various inefficient features. For example, existing approaches typically define an element selection perimeter using every point that is made by an element selection tool or other method of producing an element selection perimeter. Since these points are typically closely spaced, the resulting element selection perimeter is typically defined by many points, which typically causes element selection to be a slow and processor-intensive process. As another example, existing approaches typically determine which elements to select by testing each element in a document to determine if it is contained within the element selection perimeter. Thus, elements may be analyzed that are not even close to the interior of the element selection perimeter or that should not be selected because they are in a hidden or locked mode. This is also typically a slow and processor-intensive process.
In view of the foregoing, there is a need in the art for a method and system for selecting elements in a graphical user interface that provides fast and processor efficient performance. Specifically, a need exists to be able to define an element selection perimeter using a minimal number of points (or vertices). A further need exists to be able to determine which elements have been selected by only testing the elements that are at least partially contained within the element selection perimeter.